local lpeg=require'lpeg'
module(...,package.seeall)

function pipe_get(cmd,pat)
	local ps,err=io.popen(cmd)
	if not ps then return err end
	local r=ps:read(pat or '*a')
	ps:close()
	return r
end
